package com.sl.biz.modular.process.controller;

import com.sl.biz.modular.process.controller.request.*;
import com.sl.biz.modular.process.controller.response.ProcessRunnerInfoVO;
import com.sl.biz.modular.process.service.ProcessLogBizService;
import com.sl.biz.modular.process.service.ProcessRunnerInfoBizService;
import com.sl.core.engine.log.store.domain.dto.LogDetailDTO;
import com.sl.core.engine.log.store.domain.dto.MainLogDTO;
import lombok.RequiredArgsConstructor;
import org.simpleframework.xml.core.Validate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/process/log")
@RequiredArgsConstructor
public class ProcessLogController {

    private final ProcessLogBizService processLogBizService;

    @PostMapping("/list_by_condition")
    public List<MainLogDTO> listByCondition(@RequestBody ProcessLogListByConditionRequest list) {
        return processLogBizService.listByCondition(list);
    }
    @PostMapping("/update_state_by_id")
    public Boolean updateStateById(@RequestBody ProcessLogUpdateStateRequest list) {
        return processLogBizService.updateStateById(list);
    }
    @PostMapping("/get_detail_by_tid")
    public List<LogDetailDTO> getDetailByTid(@RequestBody ProcessLogDetailByTidRequest list) {
        return processLogBizService.getDetailByTid(list);
    }
}
